Function to calculate the index inside a rectangular grid from position ix,iy,iz
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
integer, | intent(in) | :: | ix |
Integer variables ix,iy,iz,nx,ny |
||
integer, | intent(in) | :: | iy |
Integer variables ix,iy,iz,nx,ny |
||
integer, | intent(in) | :: | iz |
Integer variables ix,iy,iz,nx,ny |
||
integer, | intent(in) | :: | nx |
Integer variables ix,iy,iz,nx,ny |
||
integer, | intent(in) | :: | ny |
Integer variables ix,iy,iz,nx,ny |
Integer variable with the index
function position2index(ix,iy,iz,nx,ny) result(index_) !======================================================================================== !! Function to calculate the index inside a rectangular grid from position ix,iy,iz integer,intent(in) :: ix,iy,iz,nx,ny !! Integer variables ix,iy,iz,nx,ny integer ::index_ !! Integer variable with the index !***** index_=ix+(iy-1)*nx+(iz-1)*nx*ny ! end function position2index